package carpediem.xin.tamplate.network.service;

import okhttp3.ResponseBody;
import retrofit2.http.GET;
import retrofit2.http.Streaming;
import retrofit2.http.Url;
import rx.Observable;

/**
 * Created by zhaijianwei on 16/12/9.
 * 通用服务接口，用于：
 * 1.加载url的字符串
 * 2.下载url对应文件
 */

public interface CommonService {

//    String BASE_URL = "http://192.168.199.174:9090/api";

    @GET
    Observable<ResponseBody> loadString(@Url String url);

    @GET
    @Streaming
    Observable<ResponseBody> downloadFile(@Url String url);
}
